There is, in both the United States and other developed countries throughout the world, a very large installed base of computer systems running a particular type of video terminal and monitor software. One of the best known examples of same is the IBM 3270 family of terminals. Such terminals include a keyboard, CRT display, and an addressable screen buffer memory for holding the contents of the CRT display. These terminals are normally used with main frame computers running a software package sold under the trademark VTAM, which is an acronym for Virtual Telecommunications Access Method. The VTAM software package was created and is sold by International Business Machines Corporation ("IBM") of White Plains, N.Y. The operating characteristics and interfaces to the VTAM software are well known to those skilled in the art and are well documented in published IBM literature. The VTAM software package includes facilities for a computer program to interface between a physical CRT and the connected application program being run by a host computer. This is commonly implemented by a physical connection of an IBM type 3274 terminal control unit connected to a plurality of dumb terminals, which physically include only the keyboard and the CRT. Irrespective of the specific physical configuration, the present invention is usable with any apparatus that includes a host computer that is connected to a command driven terminal device having an addressable screen buffer memory.
These terminal devices are configured to provide bidirectional communication with a host computer to which they are connected, either directly, or via intervening modem/telephone line combinations or other links. In particular, communications are effected by writing into and reading from the contents of the addressable screen buffer.
Like most CRT terminals with memory, the screen buffer includes addressable locations for character contents and attribute data, which controls certain aspects of the visual presentation of data at associated screen locations, such as highlighted video, reverse video, blinking, etc.
The original 3270 terminals had their origin many hardware generations ago. A simple command language for controlling the writing of data into the screen buffers was created and is part of the operating systems with which these devices are normally used. In particular, the command set includes commands to erase the buffer before writing, erase the buffer and set the alternate screen size before writing, and to write without a preceding erase. The data to be written can contain buffer control orders which include Set Buffer Address (SBA), i.e., to position to a particular address in the screen buffer at which the data orders will be place. Additional orders include ones to insert the cursor (IC), a Start Field (SF) or Start Field Extended (SFE) command to define the beginning and end of a field on the screen and the display attributes of the character or entry areas following, and to erase any existing unprotected data (EUA) up to a specified address. Data is protected or unprotected based on the attribute in the Start Field order preceding the data position.
It should therefore be understood that the contents of the screen buffer can be modified by either erasing the entire contents with an erase command followed by order to write to all locations at which the user wants data displayed, or alternatively a write command may be sent with orders to simply overwrite portions of the screen buffer leaving other portions unchanged. Both techniques are commonly used in application programs written to run on machines connected to such terminals.
Normally, only modified fields are transmitted back from the terminal device, i.e., fields in which the terminal operator added, changed, or deleted characters. These altered fields are transmitted back to the host computer preceded by the screen buffer address which the field begins. Some applications need the field data to be transmitted whether it has been modified or not. This is accomplished by having the application set the Modified Data Tag (MDT) in the attribute in the Start Field order. Those familiar with the 3270 family of terminals know that the Modified Data Tag for these particular devices is the lowest order bit in the attribute character of the Start Field order. The terminal controller sets this bit when the data is modified by the terminal operator and, as noted above, the application can also set it in order to cause the terminal controller to return the contents of the field irrespective of actions at the terminal.
Data representing the contents of fields with set Modified Data Tags are returned upon the operation of one of a plurality of interrupt keys, the most common of which is the carriage return or ENTER key. In this way, bidirectional communications are effected based on location in the screen buffer, and thus, the location of data on the screen itself.
As the sophistication of computer systems has increased and user's desire for larger terminals with greater data display capabilities have increased, larger terminals have been introduced into the 3270 family. These devices have larger screen buffers in order to accommodate more screen data and to provide a greater variety of display attributes.
The size of the screen buffers generally varies from 480 display positions on a 3270 Model 1 to 9,920 positions on a 3290 display station, one of the more sophisticated terminals of this particular family.
As large computer systems, such as airline reservation computers and the like have become more common, there are an increasing number of remotely located terminals connected to the computers via telephone links. As the size of the screen buffers is increased, it will be appreciated that significant amounts of time are required to transmit large blocks of data from a host computer running a particular application to a remote terminal device. For example, if a 9600 bit per second modem is used on a voice grade telephone line, it takes a period on the order of 25 to 30 seconds to transmit the entire contents of a 3290 screen buffer from the host to the terminal. Transmission of high volumes of data between a host computer and a terminal has the doubly undesirable effect of increasing costs for running the system by using a large amount of telephone line capacity as well as increasing the delay that users experience in interactive operations with the host.
The phenomenon of increased cost and user irritation from system slowdown has led to a number of schemes for compressing data transmitted between command driven remote terminals and host computers. Such data compression schemes are designed to reduce the volume of data transmitted back and forth between the host computer and the terminal. The fundamental common characteristic of such schemes is that some form of information concerning the present state of each terminal connected to the system is maintained locally at the host computer. A program implementing the data compression examines the information about the current state of the screen, at least as it is indicated by the information at the host, and examines outbound command strings. From analysis of these two, the programs effecting the data compression reduce the amount of data actually transmitted to the terminal in order to achieve the same resultant display.
For example, some schemes for data compression over links between a host computer and a command driven terminal maintain an indication of which particular fields on the terminal are modified by a command string sent by an application program and will transmit only instructions to overwrite the modified fields. Any redundant commands that write unchanged data to other fields are stripped out. Depending on the application that is running on the host and its activity with respect to redefining fields, this can be a useful to approach to reducing the overall amount of data transmitted from host to terminal. This is particularly true if the programmer of the application was inattentive to opportunities to avoid the transmission of redundant data for unchanged fields. Indeed, one of the main reasons that the need and market exists for data compressors of this type is the fact that there are many large computer installations with relatively old applications running where less than optimum techniques were employed by the programmers in writing the code that transmits output to remote terminals.
Additionally, modem programming languages and application generators typically insulate the programmer from the hardware requirements. In some cases, it is not possible for the programmer to direct efficient use of the terminal display in the chosen language. Also, many languages support the use of multiple terminal types independent of the application program logic. Only after the type of terminal is established in a session with the host are the true physical limitations of the display buffer known. In these cases, efficient use of the terminal buffer and telecommunications lines may not be enforced by the programmer but must be driven by the terminal processor or a compression program such as the invention described in this specification.
While transmitting only modified fields can be effective, if the fields are long and only minor modifications have been made, there is still a significant amount of redundant data transmitted.
U.S. Pat. No. 4,750,137 issued Jun. 7, 1988 to Harper et al. shows another method of compressing data that is transmitted to command driven terminals. The method disclosed in Harper creates two buffers sized identically to the terminal buffer for each terminal currently connected to the host system. One of these buffers is used to maintain a present state image of the buffer contents. In other words, this is a locally maintained duplication of what should be the contents of the screen buffer at a particular remote terminal. As the application running on the host outputs commands to write to the screen buffer, the compressor of the '137 patent does the following. It writes a copy of the present state image into the second buffer. It intercepts the outbound commands and data intended for the particular terminal, and performs the same operations on the second buffer that the terminal would had it received the data. When this process is finished, one of the duplicated buffers contains the present state image and the other buffer contains a representation of what should be the updated image of the screen buffer at the remote terminal.
These two buffers are then compared on a byte-by-byte basis, using an exclusive OR function, to determine the address locations in each buffer that contain different data. If the data is the same, the exclusive OR function will be false. If the data is different, the exclusive OR function for that particular byte location will be true and the compressor program knows that information concerning the state of this buffer location should be transmitted to the remote terminal. The program then assembles, in the terminal command language, a set of commands to write new data to the changed locations detected by the exclusive ORing process. Once this is accomplished, the modified screen image buffer becomes the present screen image buffer and the process is repeated the next time a command to write data to the screen is received from the host application.
The data compression program disclosed in Harper et al. '137 has the advantage of effectively minimizing the amount of data transmitted from the host application to the VTAMs. However, the price paid for this minimization is significant increases in both memory and CPU time overhead at the host in order to implement the compressor. For each session with a terminal having an address buffer of a given size that the host application can service at any given time, a portion of the host's memory that is more than twice the size of the terminal's buffer must be allocated. Additional memory beyond the buffer size containing order and attribute information must also be used. Furthermore, upon each burst of command strings from the host intended for a particular terminal, a number of exclusive OR operations equal to the size of the screen buffer must be made before each transmission of data is made to a remote terminal. For a numerical example, if a large host system is configured to handle 100 remote sessions supporting 3290 type terminals simultaneously, host memory on the order of 6 megabytes must be allocated just to support the data compression buffers. Also, while the Harper compression algorithm effectively minimizes transmitted data, it scans and compares a memory location corresponding to each screen buffer location, irrespective of how small the transmitted string received from the host happens to be. In other words, it is efficient with respect to data transmitted to the remote terminal, but inefficient with respect to the overhead required to service the algorithm locally at the host.
The process shown in the Harper et al. patent is algorithmically relatively simple but requires a great deal of CPU time and a significant amount of memory. To implement a single pass merger and analysis as is used in the present invention, conventional programming techniques require either the setting of a large number of flag variables to indicate present aspects of the relationship between the current state of the buffer indicated by the command string representation and the processing of the new commands. Alternately, if-then statements must be nested as deeply as the number of state variables necessary to define the current state of the method with respect to a large number of conditions. If any additional variables need to be added, the painful process of analyzing where in the nested statements the test for the new variables must be included is laborious, difficult, and prone to cause bugs in programming. Thus, the task of writing a program to implement a process such as that of the preferred embodiment of the present invention is quite complex using conventional programming techniques and leads to large object code segments.
Therefore, there is a need in the art of supporting data communications between command driven terminals and host computer systems for an improved method of compressing data transmitted to such terminals that, like the method disclosed in the Harper et al. '137 patent, effectively minimizes the length of the string transmitted to the remote terminal, but which also provides an advantage of significantly reducing both memory and computation time overhead at the host that is required to service the compression function.